package homework1;

import tester.Tester;

public class Examples {

	public SoccerScore score = new SoccerScore(1, 2, true);
	public MatchData matchData = new MatchData("Brazil", "Netherlands", score);
	public InitMatch initMatch = new InitMatch(matchData);

	public SoccerScore score2 = new SoccerScore(2, 1, false);
	public MatchData matchData2 = new MatchData("Germany", "France", score2);
	public InitMatch initMatch2 = new InitMatch(matchData2);

	public AdvanceMatch advancedMatch = new AdvanceMatch(
			new MatchData("Germany", "Netherlands", score), 
			initMatch, initMatch2);

	public BaseballScore baseballScore = new BaseballScore(4, 2, 9);
	public TennisScore tennisScore = new TennisScore(1, 2, true);
	
	public TennisScore invalidTennisScore = new TennisScore(10, 2000, true);

	public void testAll(Tester tester) {
		
		tester.checkExpect(score.isValid(), true);
		tester.checkExpect(baseballScore.isValid(), true);
		tester.checkExpect(tennisScore.isValid(), true);
		
		tester.checkExpect(invalidTennisScore.isValid(), false);
		
		tester.checkExpect(initMatch2.matchesPlayed("Germany"), 1);
		tester.checkExpect(advancedMatch.matchesPlayed("Germany"), 2);

	}

	public static void main(String[] args) {
		Tester.run(new Examples());
	}

}
